mkdir -p ../../data/tmp_fp_reduction
mkdir -p ../../data/reduced_candidates
python kaggle_preprocessing_training_data.py

python cmd.py cddv9_valid0 --valid_folds 0 --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.hdf5 --info_file lidc_kaggle_info_v2.pkl --batchsize 16 --nb_epoches 300 --callbacks 'LearningRateScheduler(lambda i: 1.0 if i<=200 else (0.1 if i<=400 else 0.01))'

python cmd.py cddv9_valid1 --valid_folds 1 --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.hdf5 --info_file lidc_kaggle_info_v2.pkl --batchsize 16 --nb_epoches 300 --callbacks 'LearningRateScheduler(lambda i: 1.0 if i<=200 else (0.1 if i<=400 else 0.01))'

python cmd.py cddv9_valid2 --valid_folds 2 --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.hdf5 --info_file lidc_kaggle_info_v2.pkl --batchsize 16 --nb_epoches 300 --callbacks 'LearningRateScheduler(lambda i: 1.0 if i<=200 else (0.1 if i<=400 else 0.01))'

python cmd.py cddv9_valid3 --valid_folds 3 --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.hdf5 --info_file lidc_kaggle_info_v2.pkl --batchsize 16 --nb_epoches 300 --callbacks 'LearningRateScheduler(lambda i: 1.0 if i<=200 else (0.1 if i<=400 else 0.01))'

python cmd.py cddv9_valid4 --valid_folds 4 --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.hdf5 --info_file lidc_kaggle_info_v2.pkl --batchsize 16 --nb_epoches 300 --callbacks 'LearningRateScheduler(lambda i: 1.0 if i<=200 else (0.1 if i<=400 else 0.01))'

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.hdf5 --info_file lidc_kaggle_info_v2.pkl --modelname vgg13_shortcuts_v2 --batchsize 16 --nb_epoches 150 cddv9_vgg13shortcutsv2_bs16_valid0 --valid_folds 0

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.hdf5 --info_file lidc_kaggle_info_v2.pkl --modelname vgg13_shortcuts_v2 --batchsize 16 --nb_epoches 150 cddv9_vgg13shortcutsv2_bs16_valid1 --valid_folds 1

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.hdf5 --info_file lidc_kaggle_info_v2.pkl --modelname vgg13_shortcuts_v2 --batchsize 16 --nb_epoches 150 cddv9_vgg13shortcutsv2_bs16_valid2 --valid_folds 2

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.hdf5 --info_file lidc_kaggle_info_v2.pkl --modelname vgg13_shortcuts_v2 --batchsize 16 --nb_epoches 150 cddv9_vgg13shortcutsv2_bs16_valid3 --valid_folds 3

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.hdf5 --info_file lidc_kaggle_info_v2.pkl --modelname vgg13_shortcuts_v2 --batchsize 16 --nb_epoches 150 cddv9_vgg13shortcutsv2_bs16_valid4 --valid_folds 4

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.hdf5 --info_file lidc_kaggle_info_v4.pkl --valid_folds 0 --batchsize 16 cddv15_v2_valid0 --nb_epoches 50

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.hdf5 --info_file lidc_kaggle_info_v4.pkl --valid_folds 1 --batchsize 16 cddv15_v2_valid1 --nb_epoches 50

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.hdf5 --info_file lidc_kaggle_info_v4.pkl --valid_folds 2 --batchsize 16 cddv15_v2_valid2 --nb_epoches 50

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.hdf5 --info_file lidc_kaggle_info_v4.pkl --valid_folds 3 --batchsize 16 cddv15_v2_valid3 --nb_epoches 50

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.hdf5 --info_file lidc_kaggle_info_v4.pkl --valid_folds 0 --batchsize 16 --modelname vgg13_shortcuts_v2 cddv15_vgg13shortcutsv2_valid0 --nb_epoches 50

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.hdf5 --info_file lidc_kaggle_info_v4.pkl --valid_folds 1 --batchsize 16 --modelname vgg13_shortcuts_v2 cddv15_vgg13shortcutsv2_valid1 --nb_epoches 50

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.hdf5 --info_file lidc_kaggle_info_v4.pkl --valid_folds 2 --batchsize 16 --modelname vgg13_shortcuts_v2 cddv15_vgg13shortcutsv2_valid2 --nb_epoches 50

python cmd.py --train --candidate_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.pkl --candidate_vol_file ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.hdf5 --info_file lidc_kaggle_info_v4.pkl --valid_folds 3 --batchsize 16 --modelname vgg13_shortcuts_v2 cddv15_vgg13shortcutsv2_valid3 --nb_epoches 50

python kaggle_predict_in_train.py
python kaggle_postprocessing_training_data.py

cp LIDC_true_nodules.pkl ../../data/reduced_candidates/LIDC_true_nodules.pkl
python prepare_h5_file_gt.py
ln -s ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v9.hdf5 ../../data/reduced_candidates/lidc_kaggle_candidates_v9.hdf5
ln -s ../../data/tmp_fp_reduction/lidc_kaggle_candidates_v15.hdf5 ../../data/reduced_candidates/lidc_kaggle_candidates_v15.hdf5
